package com.easybuilder.core.rbac.dto;

import lombok.Data;

/**
 * 部门返给前端实体
 *
 * @author 张兴帅
 * @projectName easy-builder
 * @packageNmae com.easybuilder.core.rbac.dto
 * @fileNmae SysDeptDTO
 * @date 2023-5-16
 * @copyright 华能信息技术有限公司
 * @since 0.0.1
 */
@Data
public class SysDeptDTO {
    private Long id;
    private Long parentId;
    private String parentName;
    private String deptName;
    private String deptCode;
    private String orgCode;
    private Integer sort;
    private Boolean hasChildren;
    private Boolean isLeaf;

    public void setLeaf(Boolean leaf) {
        this.isLeaf = !this.hasChildren;
    }
}